<?php
	 
	//Initialize Nebula Office framework
	require_once('../../system.php');
	
	//Load commonly used controls
	load_basic_controls();
	
	//Authenticate the user for the framework
	$GO_SECURITY->authenticate();
	
	//Authenticate the user for the module
	$GO_MODULES->authenticate('term');
	
	//Get the language variables
	require_once($GO_LANGUAGE->get_language_file('term'));
	
	//Require the module class
	require_once($GO_MODULES->class_path.'term.class.inc');
	require_once($GO_MODULES->class_path.'term_list.class.inc');
	$term = new term();
	$term_list = new term_list('term_list', $GO_SECURITY->user_id, false, true, 'term_form', $GO_MODULES->modules['term']['url']);
	// term头部需要包含的文件，一般为js文件
	$GO_HEADER['head'] = $term_list->get_header();	
	//Declare variables
	$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
	$link_back=$_SERVER['PHP_SELF'];
	
	$form = new form('term_form');
	$form->add_html_element(new input('hidden','term','',false));
	
	
	//create menu. The buttons are added in the include files.
	$menu = new button_menu();
	$menu->add_button('new_term',$lang_term['new_term'],'new_term.php');
	$menu->add_button('delete_term',$lang_term['delete_term'],'');
	
	$form->add_html_element($menu);
	$form->add_html_element($term_list);
	
	require($GO_THEME->theme_path.'header.inc');
	echo $form->get_html();
	require($GO_THEME->theme_path.'footer.inc');
	